Skip to content

Migrate to Beanie v2.0.0 and Replace Motor with PyMongo (Fixes #72) - #82

Merged
NiveditJain merged 2 commits into
FailproofAI:mainfrom
bhaveshAswani112:beanie2
Jul 28, 2025
Merged

Migrate to Beanie v2.0.0 and Replace Motor with PyMongo (Fixes #72)#82
NiveditJain merged 2 commits into
FailproofAI:mainfrom
bhaveshAswani112:beanie2

Conversation

@bhaveshAswani112

Copy link
Copy Markdown
Contributor

This pull request resolves Issue #72 by upgrading Beanie to v2.0.0, which deprecates motor support in favor of pymongo. Key changes include:

Updated pyproject.toml to use beanie>=2.0.0

Replaced AsyncIOMotorClient with AsyncMongoClient from pymongo

Updated main.py to use new initialization pattern

Added fallback for MONGO_DATABASE_NAME to avoid missing env var errors

Tested and verified that all core API routes work as expected after the migration.

@NiveditJain

Copy link
Copy Markdown
Member

I just changed the default name! Looks good apart from it!

@NiveditJain
NiveditJain merged commit b8e505d into FailproofAI:main Jul 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants